import db from "../utils/db"


export function getCustomerGoods(name) {
  return db.customerGoods.where("name").equalsIgnoreCase(name).toArray();
}

export function listCustomerGoods() {
    return db.customerGoods.orderBy("id").reverse().toArray();
}

export function addCustomerGoods(data) {
  db.customerGoods.add(data);
}

export function deleteCustomerGoods(id) {
  db.customerGoods.delete(id)
}

export function modifyCustomerGoods(data) {
  db.customerGoods.put(data);
}
